<?php /* Smarty version 2.6.26, created on 2010-10-28 23:32:30
         compiled from register.tpl */ ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "header.tpl", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<?php echo '
<script type="text/javascript">
	$(document).ready(function()
	{

	$(\'#company_radio\').click(function()
	{
		$(\'#student_block\').hide();
		$(\'#company_block\').show();
	});

	$(\'#student_radio\').click(function()
	{
		$(\'#company_block\').hide();
		$(\'#student_block\').show();
	});

	
	$("#s_faculty").change(function()
	{
	var id=$(this).val();
	var dataString = \'id=\'+id;

	$.ajax
	({
	type: "POST",
	url: "functions/getSpecialization.php",
	data: dataString,
	cache: false,
	success: function(html)
	{
	$("#s_specialization").html(html);
	} 
	});

	});	
	
	});
</script>
'; ?>

<h3>Rejestracja</h3>

<form method="post" action="register.php">
	<div class="table_div">
			<table>
				<tr>
					<td><label for="choose" class="label">Kim jesteś?</label></td>
					<td>
						<input type="radio" name="choose" id="company_radio" class="radio" value = "company">Firma<br/>
						<input type="radio" name="choose" id="student_radio" class="radio" checked="checked" value="student">Student<br/>
					</td>
					<td></td>
				</tr>
				<tr>
					<td><label for="email" class="label">Email</label></td>
					<td><input type="text" name="email" id="email" class="input"/></td>
					<td></td>
				</tr>
				<tr>
					<td><label for="password" class="label">Hasło</label></td>
					<td><input type="password" name="password" id="password" class="input"/></td>
					<td></td>
				</tr>
			</table>
			<table id="company_block" style="display:none">
					<tr>
						<td><label for="c_name" class="label">Nazwa</label></td>
						<td><input type="text" id="c_name" name="c_name" class="input"/></td>
						<td></td>
					</tr>
					<tr>
						<td><label for="c_address" class="label">Adres</label></td>
						<td><input type="text" id="c_address" name="c_address" class="input"/></td>
						<td></td>
					</tr>
					<tr>
						<td><label for="c_phone" class="label">Telefon</label></td>
						<td><input type="text" id="c_phone" name="c_phone" class="input"/></td>
						<td></td>
					</tr>	
					<tr>
						<td><label for="c_site" class="label">Strona www</label></td>
						<td><input type="text" id="c_site" name="c_site" class="input" /></td>
						<td></td>
					</tr>

					<tr>
						<td><label for="c_person_name" class="label">Imię</label></td>
						<td><input type="text" id="c_person_name" name="c_person_name" class="input" /></td>
						<td></td>
					</tr>
					<tr>
						<td><label for="c_person_surname" class="label">Nazwisko</label></td>
						<td><input type="text" id="c_person_surname" name="c_person_surname" class="input"/></td>
						<td></td>
					</tr>
					<tr>
						<td><label for="c_person_position" class="label">Stanowisko</label></td>
						<td><input type="text" id="c_person_position" name="c_person_position" class="input" /></td>
						<td></td>
					</tr>					
					<tr>
						<td><label for="c_person_email" class="label">Email</label></td>
						<td><input type="text" id="c_person_email" name="c_person_email" class="input" /></td>
						<td></td>
					</tr>
					<tr>
						<td><label for="c_person_phone" class="label">Telefon</label></td>
						<td><input type="text" id="c_person_phone" name="c_person_phone" class="input"/></td>
						<td></td>
					</tr>			
			</table>
			<table id="student_block">
					<tr>
						<td><label for="s_name" class="label">Imię</label></td>
						<td><input type="text" id="s_name" name="s_name" class="input"/></td>
						<td></td>
					</tr>
					<tr>
						<td><label for="s_surname" class="label">Nazwisko</label></td>
						<td><input type="text" id="s_surname" name="s_surname" class="input"/></td>
						<td></td>
					</tr>
					<tr>
						<td><label for="s_album" class="label">Nr. albumu</label></td>
						<td><input type="text" id="s_album" name="s_album" class="input"/></td>
						<td></td>
					</tr>	
					<tr>
						<td><label for="s_faculty" class="label">Wydział</label></td>
						<td>
						
							<select id="s_faculty" name="s_faculty" class="select">
								<option selected="selected">--Wybierz wydział--</option>
								<?php $_from = $this->_tpl_vars['faculties']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['faculty']):
?>
									<option value="<?php echo $this->_tpl_vars['faculty']['id']; ?>
"><?php echo $this->_tpl_vars['faculty']['name']; ?>
</option>
								<?php endforeach; endif; unset($_from); ?>
							</select>
						</td>
						<td></td>
					</tr>
					<tr>
						<td><label for="s_specialization" class="label">Kierunek</label></td>
						<td>
							<select id="s_specialization" name="s_specialization" class="select">
								<option selected="selected">--Wybierz kierunek--</option>					
							</select>
						</td>
						<td></td>
					</tr>						
			</table>
	</div>
	<div style="clear:both"></div>
	<input type="submit" value="Rejestruj" class="button"/>
</form>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "footer.tpl", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>